<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 用户名：<input type="text" class="username" />
    密码：<input type="text" class="pwd" />
    <button class="btn">点击</button> -->


    <form action="show.html">
        用户名：<input type="text" class="username" name="username" />
        密码：<input type="text" class="pwd" name="pwd" />
        <button type="submit">提交</button>
    </form>


    <script>
        // var userEle = document.querySelector(".username");
        // var pwdEle = document.querySelector(".pwd");
        // var btnEle = document.querySelector(".btn");

        // btnEle.onclick = function(){
        //     var username = userEle.value;
        //     var pwd = pwdEle.value;
        //     window.location.href = `show.html?username=${username}&pwd=${pwd}`;
        // }



    </script>
</body>

</html>